package com.jeebey.mybatis.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @since Java Persistence 1.0
 */
@Target({ METHOD, FIELD })
@Retention(RUNTIME)
public @interface Column {

	/**
	 * (Optional) The name of the column. Defaults to the property or field
	 * name.
	 */
	String name() default "";

	/**
	 * (Optional) Whether the column is a unique key. This is a shortcut for the
	 * <code>UniqueConstraint</code> annotation at the table level and is useful
	 * for when the unique key constraint corresponds to only a single column.
	 * This constraint applies in addition to any constraint entailed by primary
	 * key mapping and to constraints specified at the table level.
	 */
	boolean escape() default false;

	

}